import Vue from 'vue'
import {debounceOnce} from 'common/js/utl'
var vm, gl = Vue.prototype.$isServer ? global : window

let key = Symbol.for('__aggregation')
vm  = gl[key]

if(!vm){
  vm = gl[key] = new Vue()


  vm.$on('session.expire', debounceOnce(function (msg) {
    // vm.$warn('会话已过期，请重新登录')
  }, 1000))


  vm.$on('session.timeout', debounceOnce(function (msg) {
    // vm.$warn('请求超时了')
  }, 1000))


}




export  default  vm












